import { defineConfig } from "tsup";

export default defineConfig({
  entry: ["src/index.ts", "src/worker.ts"],
  format: ["cjs", "esm"],
  dts: true,
  splitting: false,
  sourcemap: true,
  clean: true,
  // 添加 esbuildOptions 来保留目录结构
  esbuildOptions(options, context) {
    options.outbase = "src"; // 相对于 'src' 目录计算输出路径
    return options;
  },
});
